Skip to content

autowire errors improvements#195

Merged
mbore merged 3 commits intomasterfrom
improve-errors-in-autowire
Feb 16, 2022
Merged

autowire errors improvements#195
mbore merged 3 commits intomasterfrom
improve-errors-in-autowire

Conversation

@mbore
Copy link
Copy Markdown
Contributor

@mbore mbore commented Jan 28, 2022

No description provided.

@mbore mbore added the autowire label Jan 28, 2022
@mbore mbore force-pushed the improve-errors-in-autowire branch from 344c38f to 16fa26b Compare February 3, 2022 17:33
@mbore mbore changed the title [WIP] autowire errors improvements autowire errors improvements Feb 3, 2022
@mbore mbore marked this pull request as ready for review February 3, 2022 17:34
"constructInputProvider" -> List("Failed to create an instance of [B].", "Cannot construct instance of [String] on path [constructor B].a -> [constructor A].s"),//TODO we should add a warning in this case.
"missingConstructorDependencies" -> List("Failed to create an instance of [C].", "Cannot construct instance of [Int] on path [constructor C].b -> [constructor B].i"),
"missingApplyDependencies" -> List("Failed to create an instance of [", "C].", "Cannot construct instance of [Int] on path [constructor C].b -> [method apply].i"),
"missingFactoryMethodDependencies" -> List("Failed to create an instance of [C].", "Cannot construct instance of [Int] on path [constructor C].b -> [method makeB].i"),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd adjust the error message. The problem that we are signalling is that there's a missing dependency - which causes creation of e.g. B impossible. So the error message should be sth like:

Missing dependency of type [Int]. Path: [constructor C].b -> [method makeB].i

@adamw
Copy link
Copy Markdown
Member

adamw commented Feb 14, 2022

Except for the message I don't have anything to add, looks good :)

@mbore mbore merged commit 52a5b96 into master Feb 16, 2022
@adamw adamw deleted the improve-errors-in-autowire branch September 10, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants